<?php
include_once('admin_global.php');
$db->Get_user_shell_check($uid, $shell);   //检测用户是否登录

$newsID = $_GET['newsID'];      //获得文章ID
$rows=$db->delete("news","newsID=$newsID");
if($rows>0){
    if($_SESSION['userType']=='普通管理员'){
        echo "<script>alert('文章删除成功！');window.location.href='listMyNews.php'</script>";
    }else{
        echo "<script>alert('文章删除成功！');window.location.href='listNews.php'</script>";
    }
}else{
    echo "<script>alert('文章删除失败！');history.go(-1);</script>";
}
?>